package com.haiya.state.studycase;

public class ScoreContext {
    private AbstractState state;

    public ScoreContext() {
        this.state = new LowState(this);
    }

    public AbstractState getState() {
        return state;
    }

    public void setState(AbstractState state) {
        this.state = state;
    }

    /**
     * 增加分数
     * @param score
     */
    public void add(int score) {
        state.addScore(score);
    }
}
